<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/Admin/tpl/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/Admin/tpl/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="/Admin/tpl/Css/style.css" />
    <script type="text/javascript" src="/Admin/tpl/Js/jquery.js"></script>
    <script type="text/javascript" src="/Admin/tpl/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="/Admin/tpl/Js/bootstrap.js"></script>
    <script type="text/javascript" src="/Admin/tpl/Js/ckform.js"></script>
    <script type="text/javascript" src="/Admin/tpl/Js/common.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form class="form-inline definewidth m20" action="index.html" method="get">  
    商品名称：
    <input type="text" name="rolename" id="rolename"class="abc input-default" placeholder="" value="">&nbsp;&nbsp;  
    <button type="submit" class="btn btn-primary">查询</button>&nbsp;&nbsp; <button type="button" class="btn btn-success" id="addnew">添加商品</button>&nbsp;&nbsp; <button type="button" class="btn btn-success" id="classmanage">类别管理</button>
</form>
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
        <th>商品id</th>
		<th>商品图片</th>
        <th>商品名称</th>
        <th>商品分类</th>
		<th>商品品牌</th>
        <th>商品售价</th>
		<th>订单</th>
		<th>销量</th>
		<th>库存</th>
		<th>人气</th>
		<th>操作</th>
    </tr>
    </thead>
    <Volist name='product' id='vo'>
	     <tr>
            <td>{$vo.product_id}</td>
            <td><img src='/uploadfiles/{$vo.image}' width='70'/></td>
            <td>{$vo.title}</td>
			<td>{$vo.class_name}</td>
			<td>{$vo.pinpai_name}</td>
			<td>{$vo.price}</td>
			<td>{$vo.dingdan}</td>
			<td>{$vo.xiaoliang}</td>
			<td>{$vo.kucun}</td>
			<td>{$vo.renqi}</td>
            <td>
                  <a href="__APP__/Product/edit?id={$vo.product_id}&lanmu_id={$lanmu_id}">编辑</a>
                  <a href="/index.php/Product/info?lanmu_id={$lanmu_id}&id={$vo.product_id}" target='blank'>查看</a>
                  <a href="__APP__/Product/del?id={$vo.product_id}" onclick='javascript:return  confirm("确定要删除吗？");'>删除</a>
            </td>
        </tr>
       </Volist>
       </table>
	   <div class='page'>{$page}</div>
		</body>
		</html>

<script>
    $(function () {
        
		$('#addnew').click(function(){
				window.location.href="__APP__/Product/add?id={$lanmu_id}";
		 });
		 $('#classmanage').click(function(){

				window.location.href="__APP__/Class/index?id={$lanmu_id}";
		 });


    });

	function del(id)
	{
		
		
		if(confirm("确定要删除吗？"))
		{
		
			var url = "index.html";
			
			window.location.href=url;		
		
		}
	
	
	
	
	}
</script>